package pers.cj.pdos.service;

import org.apache.ibatis.annotations.Param;
import pers.cj.pdos.entity.Custom;
import com.baomidou.mybatisplus.extension.service.IService;
import pers.cj.pdos.entity.CustomType;
import pers.cj.pdos.entity.Goods;
import pers.cj.pdos.vo.CustomVo;
import pers.cj.pdos.vo.ProviderVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author chenj
 * @since 2019-11-04
 */
public interface ICustomService extends IService<Custom> {

    boolean checkName(String companyId, String name);

    boolean checkNo(String companyId, String no);

    List<CustomVo> listVoForInit(String companyId, Integer page, Integer limit, String search);

    Long countForInit(String companyId,String search);

    List<CustomVo> listVoPage(String companyId,
                              Integer page,
                              Integer limit,
                              Integer status,
                              String search,
                              String customTypeId,
                              String no,
                              String name,
                              String unitTel,
                              String phone,
                              String contacts,
                              String remark,
                              String storeId,
                              String userId);

    long count(String companyId,
               Integer status,
               String search,
               String customTypeId,
               String no,
               String name,
               String unitTel,
               String phone,
               String contacts,
               String remark,
               String storeId,
               String userId);

    List<CustomVo> listVo(String companyId);

    void update(Custom custom);

    void batchChangeCustomType(String customTypeId, List<Custom> list);


    Map<String,Long> check(List<Custom> customList);

    void deleteBatch(List<Custom> list);

    void insert(List<Custom> customList, List<CustomType> customTypeList);

    List<CustomVo> listVoByIds(List<String> ids);

    Custom getDefault(String storeId);
}
